<template>
  <!-- 文章详情 -->
  <div id="collectDetail">
    <el-form :model="form" label-width="100">
      <el-form-item label="标题:">
        <p>{{ form.title }}</p>
      </el-form-item>
      <el-form-item label="作者:">
        <p>{{ form.author }}</p>
      </el-form-item>
      <el-form-item label="摘要:">
        <p>{{ form.digest }}</p>
      </el-form-item>
      <el-form-item label="附件:" style="width: 100%">
        <img :src="form.imgUrl" alt="" class="img" />
      </el-form-item>
      <el-form-item label="内容:" style="width: 100%">
        <div v-html="form.content"></div>
      </el-form-item>
      <el-form-item label="原文URL:" style="width: 100%">
        <p>{{ form.contentSourceUrl }}</p>
      </el-form-item>
      <el-form-item label="发布状态:">
        <p v-if="form.status == 0">未发布</p>
        <p v-if="form.status == 1" style="color: #67c23a">发布成功</p>
        <p v-if="form.status == 2" style="color: #f56c6c">发布未通过</p>
      </el-form-item>
      <el-form-item label="创建时间:" v-if="form.updateTime">
        <p>{{ form.updateTime }}</p>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  name: 'articleDetail',
  data () {
    return {

    }
  },
  props: {
    form: {
      type: Object,
      required: true,
      default: () => {
        return {}
      }
    }
  },
  methods: {

  }
}
</script>
<style lang='scss' scoped>
.img {
  width: 250px;
  height: 200px;
  object-fit: cover;
}
</style>